package com.sfac.springboot.modules.test.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sfac.springboot.modules.common.entity.AbstractEntity;
import lombok.Data;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * @author jzq
 * @date 2022/8/19 10:53
 */
@SuppressWarnings({"all"})
@Data
@Entity
@Table(name = "test_card")
public class Card extends AbstractEntity {

    @OneToOne(mappedBy = "studentCard",cascade = CascadeType.ALL)
    @JsonIgnore
    private Student student;

    private String cardNum;

}
